<template>
  <div class="iframe">
    <div class="i-title">
      <h3>组合与选项对比</h3>
    </div>
    <div class="i-tip">
      {{ tip }}
    </div>
    <div class="i-tip">
      {{ tip2 }}
    </div>
    <div class="i-tip">
      <el-button @click="clk">选项点击</el-button>
      <el-button @click="clk2">组合点击</el-button>
    </div>
  </div>
</template>

<script>
import { ref } from "vue"
export default {
  name: 'HelloWorld',
  data() {
    return {
      tip: "..."
    }
  },
  methods: {
    clk() {
      this.tip = "源于 选项点击";
    }
  },
  setup() {
    let tip2 = ref("...");
    const clk2 = () => {
      tip2.value = "源于 组合式点击";
    }
    return {
      tip2,
      clk2
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>
